package asdf.trial;

/**
 * Created by chengwenlee on 12/16/15.
 */
public class NumberTest
{

    public static void main(String[] args)
    {
        System.out.println("1.1 - 1.0");
        System.out.println(1.1 - 1.0);
        System.out.println();
        System.out.println("1.0 / 0.0");
        System.out.println(1.0 / 0.0);
        System.out.println(1.0 / 0.0 == Double.POSITIVE_INFINITY);
        System.out.println();
        System.out.println("Math.min(Double.MIN_VALUE, 0.0d)");
        System.out.println(Math.min(Double.MIN_VALUE, 0.0d));
        System.out.println();
        System.out.println("Float.NaN == Double.NaN");
        System.out.println(Float.NaN == Double.NaN);
        System.out.println();
        System.out.println("Float.POSITIVE_INFINITY == Double.POSITIVE_INFINITY");
        System.out.println(Float.POSITIVE_INFINITY == Double.POSITIVE_INFINITY);
        System.out.println();
        System.out.println("Double.POSITIVE_INFINITY > Double.NaN");
        System.out.println(Double.POSITIVE_INFINITY > Double.NaN);
        System.out.println();
        System.out.println("Double.NEGATIVE_INFINITY != Double.NaN");
        System.out.println(Double.NEGATIVE_INFINITY != Double.NaN);
        System.out.println();
        System.out.println("Double.POSITIVE_INFINITY > Double.NEGATIVE_INFINITY");
        System.out.println(Double.POSITIVE_INFINITY > Double.NEGATIVE_INFINITY);
        System.out.println();
        System.out.println(
                "Double.POSITIVE_INFINITY == Double.longBitsToDouble(0x7ff0000000000000L)");
        System.out
                .println(Double.POSITIVE_INFINITY == Double.longBitsToDouble(0x7ff0000000000000L));
        System.out.println();
        System.out.println("Double.POSITIVE_INFINITY > 0x7ff0000000000000L");
        System.out.println(Double.POSITIVE_INFINITY > 0x7ff0000000000000L);
        System.out.println();
        System.out.println(
                "Double.NEGATIVE_INFINITY == Double.longBitsToDouble(0xfff0000000000000L)");
        System.out
                .println(Double.NEGATIVE_INFINITY == Double.longBitsToDouble(0xfff0000000000000L));
        System.out.println();
        System.out.println("Double.NEGATIVE_INFINITY < 0xfff0000000000000L");
        System.out.println(Double.NEGATIVE_INFINITY < 0xfff0000000000000L);
        System.out.println();
        System.out.println("Double.POSITIVE_INFINITY < Double.longBitsToDouble(Long.MAX_VALUE)");
        System.out.println(Double.POSITIVE_INFINITY < Double.longBitsToDouble(Long.MAX_VALUE));
        System.out.println();
        System.out.println("Double.POSITIVE_INFINITY == Double.longBitsToDouble(Long.MAX_VALUE)");
        System.out.println(Double.POSITIVE_INFINITY == Double.longBitsToDouble(Long.MAX_VALUE));
        System.out.println();
        System.out.println("Double.POSITIVE_INFINITY > Double.longBitsToDouble(Long.MAX_VALUE)");
        System.out.println(Double.POSITIVE_INFINITY > Double.longBitsToDouble(Long.MAX_VALUE));
        System.out.println();
    }

}
